<!doctype html>
<html>

	<head>
		<meta charset="utf-8">
		<title>组件列表</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover" />
		<link href="css/mui.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="css/mui.picker.css" />
		<link rel="stylesheet" type="text/css" href="css/mui.poppicker.css" />
		<link rel="stylesheet" type="text/css" href="css/comment.css" />
		<link rel="stylesheet" type="text/css" href="css/eqParameter.css" />
		<link rel="stylesheet" type="text/css" href="css/dataHistory.css" />
	</head>

	<body>
		<!-- 侧滑导航根容器 -->
		<div class="mui-off-canvas-wrap mui-slide-in">
			<!-- 菜单容器 -->
			<!-- 主页面容器 -->
			<div class="mui-inner-wrap">
				<!-- 主页面标题 -->
				<header class="mui-bar mui-bar-nav gradient_normal">
					<div style="height: 20px;"></div>
					<div class="mui-action-back mui-pull-left mui-icon mui-icon-arrowleft"></div>
					<h1 class="mui-title">组件列表</h1>
				</header>
				<div class="mui-content mui-scroll-wrapper" style="padding-top: 64px;">
					<div class="mui-scroll" style="bottom: 0;top: 64px;">
						<!-- 主界面具体展示内容 -->
						<div class="eqbox" style="padding: 0.2rem 0.3rem;height: 100%;overflow-y: auto;">
							
						</div>
					</div>
				</div>
				<div class="mui-off-canvas-backdrop"></div>
			</div>
		</div>
		<script src="js/mui.js"></script>
		<script src="js/mui.picker.js" type="text/javascript"></script>
		<script src="js/mui.poppicker.js" type="text/javascript"></script>
		<script src="js/jquery.js"></script>
		<script src="js/rem.js"></script>
		<script type="text/javascript">
			var _url = "http://112.54.80.235:8038";
			mui.init();
			mui.plusReady(function() {
				// //关闭等待框
				plus.nativeUI.closeWaiting();
				var self = plus.webview.currentWebview();
				var info = self.info;
				var DevNo = info.Id;
				//数据绑定
				getData(DevNo);
			});
			//获取组件信息
			function getData(DevNo){
				$.ajax({
					type: 'get',
					url: _url + '/actionapi/Users/SJGetSheBeizujian',
					dataType: 'json',
					data: {
						DevNo: DevNo
					},
					success: function(data) {
						console.log(JSON.stringify(data.data));
						var data = data.data;
						var html = '';
						for (var i = 0; i < data.length; i++) {
							html += '<div class="eqP_item" data-id="'+data[i].ChildId+'">';
							html += '<div class="title">'+data[i].DeviceName+'</div>';
							html += '<div class="content"><div class="rol clearfix">';
							html += '<span class="fl">型号规格：</span><span class="fr">'+data[i].GuiGe+'</span>';
							html += '</div><div class="rol clearfix">';
							html += '<span class="fl">使用部门：</span><span class="fr">'+data[i].BuMen+'</span>';
							html += '</div><div class="rol clearfix">';
							html += '<span class="fl">安装地点：</span><span class="fr">'+data[i].DiDian+'</span>';
							html += '</div></div></div>';
						}
						$('.eqbox').html(html);
					},
					error: function(XMLHttpRequest, textStatus, errorThrown) {
						plus.nativeUI.alert("SJGetSheBei接口有误", function(e){
								console.log(e.index);
							}, "信息提示", '确定');
					}
				})
			}
		</script>
	</body>

</html>
